package ControlLayer;
import java.util.Iterator;
import ModelLayer.Dvd;
import ModelLayer.DVDContainer;

public class DVDCtr
{
    private DVDContainer dvdCont;
    private static DVDCtr instance = null;
    
    public DVDCtr() { dvdCont = DVDContainer.getInstance();}  
    public static DVDCtr getInstance()  {  if(instance==null) instance = new DVDCtr();   return instance;  }
    
    
    
    public void createDVD(long id,String title, String artist, String publicationDate, String description)
    {   dvdCont.createDVD(id, title, artist, publicationDate, description); }    
    
    public boolean deleteDVD(long id) { return dvdCont.deleteDVD(id); }
    
    public Dvd getDVD(long id) { return dvdCont.getDVD(id);}
    
    public boolean createCopy(long id, String serialNumber, double purchasePrice) { return dvdCont.createCopy(id, serialNumber, purchasePrice); }
    
    public boolean updateDVD(long id, String title, String artist, String description) { return dvdCont.updateDVD(id, title, artist, description); }
        
    public Iterator listAllDvds()  {  return dvdCont.listAllDVDs(); }
    public Iterator listDvdCopies(long id) { return dvdCont.listDvdCopies(id); }
}
